import configparser
import sys
import os


def read_config_file(config_file_path: str):
    cf = configparser.ConfigParser()
    cf.read(config_file_path)

    # return all sections
    secs = cf.sections()
    print("sections:", secs)

    # game0 section
    url = cf.options("siteurl")
    print("siteurl:", url)

    items = cf.items("siteurl")
    print("siteurl items:", items)

    # read
    url = cf.get("siteurl", "url")
    dirs = cf.get("dirs", "directorys")
    chrome_driver_path = cf.get("dirs", "chromedriverpath")

    print("print:%s,%s" % (url, dirs))

    return url, dirs, chrome_driver_path
